﻿using System;
//
using PerceptiveMCAPI;
//
namespace PerceptiveMCAPI_Test
{
   public partial class get_listAbuseReports : System.Web.UI.UserControl
   {
      public ApiMethod method { get; set; }

      public string listId
      {
         get { return tbListId.Text.Trim(); }
         set { tbListId.Text = value; }
      }
      public int start
      {
         get
         {
            int i; int.TryParse( tbStart.Text.Trim(), out i );
            return i;
         }
         set { tbStart.Text = value.ToString(); }
      }
      public int limit
      {
         get
         {
            int i; int.TryParse( tbLimit.Text.Trim(), out i );
            return i;
         }
         set { tbLimit.Text = value.ToString(); }
      }
      public DateTime since
      {
         get
         {
            DateTime dt; DateTime.TryParse( tbSince.Text.Trim(), out dt );
            return dt;
         }
         set { tbSince.Text = value.ToString(); }
      }
      // -----------------------------------------------   
      public void Setup()
      {
         this.Visible = true;
         lblSection.Text = method.section;
         lblMethod.Text = method.name;
         tbListId.Focus();
         //
         start = MCAPISettings.default_start;
         limit = MCAPISettings.default_limit_listAbuseReports;
      }
      // -----------------------------------------------   
   }
}